//
//  ShowWebVC.m
//  Base_App
//
//  Created by Yutian Duan on 2019/6/25.
//  Copyright © 2019年 Wanwin. All rights reserved.
//

#import "ShowWebVC.h"

@interface ShowWebVC () <UIWebViewDelegate>

@property (nonatomic, strong) UIWebView *webView;

@end

@implementation ShowWebVC

- (void)viewDidLoad {
  [super viewDidLoad];
  // Do any additional setup after loading the view.
}

- (void)createFields {
  [super createFields];
  [self createBlackBack];
}

- (void)createViews {
  
  _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, NavBarHeight, ScreenWidth, ScreenHeight - NavBarHeight)];
  _webView.delegate = self;
  [self.view addSubview:_webView];
  
  
  
}

- (void)loadData {
  [super loadData];
  
  NSURL *url = [NSURL URLWithString:self.urlStr];
  [_webView loadRequest:[NSURLRequest requestWithURL:url]];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView {
  
  self.navigationItem.title = [webView stringByEvaluatingJavaScriptFromString:@"document.title"];
  

}



/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end

